package cn.edu.zut.soft.student.service.course;

import cn.edu.zut.soft.student.bean.PageBean;
import cn.edu.zut.soft.student.model.Course;
import cn.edu.zut.soft.student.service.course.vo.CourseQuery;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @Author ChrisPhantom
 * @ChreatDate 2021/02/20 10:59
 */
public interface CourseBo {

    /*
     * @Param: [course]
     * @Return: void
     * @Author: ChrisPhantom
     * @Date: 2021/2/20 11:00
     * @Description: 新增课程
     */
    public int addCourse(Course course);

    /*
     * @Param: [file]
     * @Return: int
     * @Author: ChrisPhantom
     * @Date: 2021/2/26 11:09
     * @Description: 导入课程
     */
    public int importCourses(MultipartFile file) throws Exception;

    /*
     * @Param: [courseid]
     * @Return: void
     * @Author: ChrisPhantom
     * @Date: 2021/2/20 11:01
     * @Description: 按课程ID删除
     */
    public int deleteCourse(String courseid);

    /*
     * @Param: [course]
     * @Return: void
     * @Author: ChrisPhantom
     * @Date: 2021/2/20 11:02
     * @Description: 更新课程
     */
    public int updateCourse(Course course);

    /*
     * @Param: [courseid]
     * @Return: void
     * @Author: ChrisPhantom
     * @Date: 2021/2/20 11:03
     * @Description: 按课程号查询
     */
    public Course queryCourseById(String courseid);

    /*
     * @Param: [courseQuery]
     * @Return: cn.edu.zut.soft.student.bean.PageBean<java.util.List<cn.edu.zut.soft.student.model.Course>>
     * @Author: ChrisPhantom
     * @Date: 2021/2/20 11:05
     * @Description: 按需获取课程列表
     */
    public PageBean<List<Course>> queryCourses(CourseQuery courseQuery);
}
